Skip to content

chore(spanner): add epsilon-greedy strategy to ReplicaSelector#12743

Open
olavloite wants to merge 1 commit intomainfrom
spanner-replica-selector-epsilon-greedy
Open

chore(spanner): add epsilon-greedy strategy to ReplicaSelector#12743
olavloite wants to merge 1 commit intomainfrom
spanner-replica-selector-epsilon-greedy

Conversation

@olavloite
Copy link
Copy Markdown
Contributor

Add an epsilon-greedy strategy to the standard ReplicaSelector to ensure that all endpoints are used from time to time. This ensures that new endpoints that show up are also used.

Add an epsilon-greedy strategy to the standard ReplicaSelector to ensure that all
endpoints are used from time to time. This ensures that new endpoints that show up
are also used.
@olavloite olavloite requested review from a team as code owners April 10, 2026 12:32
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces epsilon-greedy exploration to the PowerOfTwoReplicaSelector class by adding a configurable epsilon parameter and updating the selection logic. While the implementation includes parameter validation and updated unit tests, the feedback highlights that the new default epsilon of 0.1 changes the class's standard behavior compared to the previous pure Power of Two implementation. It is suggested to consider a default epsilon of 0.0 to maintain backward compatibility and avoid breaking changes to the existing selection strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant